<html>
	{% include "../common_head.html" %}
	<body>
	{% include "../common_menus.html" %}
	
	
	<div id="content">
	
		<div id="rakontu_form_style" class="rakontu_form">
		<form action="/{{dir_visit}}/{{url_filters}}?{{rakontu.urlQuery}}" method="post" enctype="multipart/form-data">
		
		{% if changes_saved %}
			<div class="message">{{template_changes_saved}}</div>
		{% endif %}
		
		{% if filters %}
			<h4>{{template_saved_filters}}</h4>
		      	<table border="0" cellpadding="4" cellspacing="0">
		      	<tr>
		      		<th>{{template_name}}<br/></th>
		      		<th>{{template_words}}</th>
		      		<th>{{template_tags}}</th>
		      		<th>{{template_questions_about_entries}}</th>
		      		<th>{{template_questions_about_members_or_characters}}</th>
		      		<th>{{template_created}}</th>
		      		<th>{{template_private}}?</th>
		      		<th>{{template_remove}}?</th>
		      	{% for filter in filters %}
			      	<tr>
			      	<td>{{filter.name}}<br/>
			      		<a href="{{filter.linkURL}}">{{template_apply_to_home_page}}</a><br/>
			      		<a href="{{filter.editURL}}">{{template_change}}</a>
			      		</td>
			      	<td>
			      		{% if filter.words %}
			      			{{filter.words_anyOrAll}}: <b>{{filter.words|join:", "}}</b> <br/>
				      		{% for i in filter_locations|makeRangeFromListLength %}
				      			{% if filter.words_locations|listLookup:i %}
				      				{{filter_locations_display|listLookup:i}}<br/>
				      			{% endif %}
				      		{% endfor %}
			      		{% else %}
			      			&nbsp;
			      		{% endif %}
			      		</td>
			      	<td>{% if filter.tags %}
			      			{{filter.tags_anyOrAll}}: {{filter.tags|join:", "}}
			      		{% endif %}&nbsp;
			      		</td>
			      	<td>
			      		{% for ref in filter.getEntryQuestionRefs %}
			      			{{ref.questionName}}: 
			      			{% if ref.questionType|equalTest:"text" %}
			      				{{ref.comparison}}
			      			{% endif %}
			      			{% if ref.questionType|equalTest:"value" %}
			      				{{ref.comparison}}
			      			{% endif %}
			      			<b>{{ref.answer}}</b><br/>
			      		{% endfor %}
			      		&nbsp;
			      		</td>
			      	<td>
			      		{% for ref in filter.getCreatorQuestionRefs %}
			      			{{ref.questionName}}: 
			      			{% ifequal ref.questionType "text" %}
			      				{{ref.comparison}}
			      			{% endifequal %}
			      			{% if ref.questionType|equalTest:"value" %}
			      				{{ref.comparison}}
			      			{% endif %}
			      			<b>{{ref.answer}}</b><br/>
			      		{% endfor %}
			      		&nbsp;
			      		</td>
					<td>{% if current_member.timeFormat %}
							{{filter.created|timeZone:current_member.timeZoneName|time:current_member.timeFormat}}<br/>
						{% endif %}
						{{filter.created|timeZone:current_member.timeZoneName|date:current_member.dateFormat}}
					</td>
					<td>
						{% if filter.private %} 
							{{template_private|lower}} 
						{% else %} 
							{{template_shared|lower}} 
						{% endif %}
					</td>
					<td width="80"><input type="checkbox" name="remove|{{ filter.key }}" value="yes" id="remove|{{ filter.key }}"/>
						<label for="remove|{{ filter.key }}">{{template_remove}}</label>
						</td>
					</tr>
				{% endfor %}
				</table>
		{% else %}
			{{blurbs|dictLookup:"no_filters"}}
		{% endif %}
		
      	<p>
    {% if filters %}
    	<center><input type="submit" name="changeSettings|{{member.key}}" value="{{button_remove_selected_filters}}" class="button"></center>
    {% endif %}
	</form>	
	</div>
	</div>
	{% include "../common_footer.html" %}
	</body>
</html>
